package com.hefu.virtuallife.ui.purchase.adapter;

import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.dz.utlis.ClassTools;
import com.hefu.virtuallife.R;
import com.hefu.virtuallife.ui.foods.bean.CollectionSellersBean;
import com.hefu.virtuallife.ui.purchase.GoodsDetailActivity;
import com.hefu.virtuallife.ui.purchase.bean.HomePurchaseBean;
import com.hefu.virtuallife.ui.purchase.bean.PurchaseFoodsBean;

import java.util.Set;

/**
 * creat_user: zhengzaihong
 * Email:1096877329@qq.com
 * creat_date: 2018/8/13
 * creat_time: 13:34
 * describe 家庭采购首页列表适配器
 **/

public class PurchaseFoodAdapter extends BaseQuickAdapter<PurchaseFoodsBean, BaseViewHolder> {


    public PurchaseFoodAdapter() {
        super(R.layout.itme_activity_home_purchase_goods);
    }


    @Override
    protected void convert(BaseViewHolder holder, PurchaseFoodsBean shardAllBean) {

        holder.getView(R.id.tv_foods_address).setOnClickListener(view -> {
            ClassTools.toAct(mContext,GoodsDetailActivity.class);
        });

    }


    private CheckListenner listenner;

    public void setCheckListenner(CheckListenner listenner) {
        this.listenner = listenner;
    }

    public interface CheckListenner {
        void callBack(Set<CollectionSellersBean> data);
    }
}
